<template>
  <div>
    <!-- 使用导航栏来切换地区，比之前大字美观 -->
    <van-nav-bar
      title="求助"
      right-text="切换地区"
      @click-right="show = true"
      :border="false"
    />
    <!-- ActionSheet动画面板显示切换区域 -->
    <van-action-sheet
      v-model="show"
      :actions="actions"
      @select="onSelect"
      close-on-click-action
      cancel-text="取消"
    />

    <!-- 标签页切换 -->
    <van-tabs>
      <van-tab v-for="index in 8" :title="'标签 ' + index" :key="index">
        内容 {{ index }}
        <!-- 占位符 -->
        <router-view />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // 为ActionSheet添加属性
      show: false,
      actions: [{ name: "本校区" }, { name: "全国区" }],
    };
  },

  methods: {
    // ActionSheet触发事件
    onSelect() {},
  },
};
</script>

<style>
</style>